<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${path}/css/editTable.css">
    
    <script type="text/javascript">
    	function check(){
    		var sp_code_id = document.getElementById("sp_code_id").value;
     		if("" == sp_code_id || "0" == sp_code_id){
     			alert("请选择业务短号码");
     			return false;
     		}
     		
     		var day_limit = document.getElementById("day_limit").value;
     		if("" == day_limit){
     			alert("请输入日限");
     			return false;
     		}
     		
     		var month_limit = document.getElementById("month_limit").value;
     		if("" == month_limit){
     			alert("请输入月限");
     			return false;
     		}
    	}
    </script>
  </head>
  <body>
    <div>
    	<form id="addLimitCodeForm" name="addLimitCodeForm" method="post" action="${path }/limitCode/saveLimitCode.action" onsubmit="return check();">
    		<p>填写短号码省份管控配置信息</p>
    		<table>
    			<tr>
    				<td>业务短号码</td>
    				<td>
    					<select id="sp_code_id" name="limitCodeVo.sp_code_id">
		    				<option value="0">--请选择--</option>
		    				<c:if test="${configBusinessVoList != null && fn:length(configBusinessVoList) > 0 }">
		    					<c:forEach items="${configBusinessVoList }" var="configBusinessVo" varStatus="i">
		    						<option value="${configBusinessVo.id }">${configBusinessVo.sp_code }</option>
		    					</c:forEach>
		    				</c:if>
		    			</select>
    					<span style="color: red;size: 2px;">&nbsp;*必选项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>管控省份</td>
    				<td>
    					<input type="text" id="province" name="limitCodeVo.province" value="${limitCodeVo.province }" />
    					<span style="color: red;size: 2px;">&nbsp;*不填默认全部生效  &nbsp;多个省份用英文":"分隔&nbsp;格式：北京:上海</span>
    				</td>
    			</tr>
    			<tr>
    				<td>日限(元)</td>
    				<td>
    					<input type="text" id="day_limit" name="limitCodeVo.day_limit" value="${limitCodeVo.day_limit }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>月限(元)</td>
    				<td>
    					<input type="text" id="month_limit" name="limitCodeVo.month_limit" value="${limitCodeVo.month_limit }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
    					<input type="submit" name="submit" value="确认" />
    				</td>
    			</tr>
    		</table>
    	</form>
    </div>
  </body>
</html>